package com.pureut.storage.dubbo;

import com.pureut.storage.service.WarehouseService;
import com.sale.storage.api.RemoteWarehouseNameService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * 仓库服务
 */
@RequiredArgsConstructor
@DubboService
@Service
public class RemoteWarehouseNameServiceImpl implements RemoteWarehouseNameService {

    private final WarehouseService warehouseService;
    /**
     * 根据仓库id获取仓库名称
     */
    @Override
    public String getWarehouseName(Long id) {
        return warehouseService.getWarehouseName(id);
    }

    /**
     * 根据仓库id获取仓库-库区-库位数据
     */
    @Override
    public String getCombinationByWarehouseId(Long wareHouseId) {
        return warehouseService.getCombinationByWarehouseId(wareHouseId);
    }
}
